<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.*,cn.edu.lingnan.dto.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>景点信息页面</title>
</head>
<body>
	<h1>端州景点信息展示如下</h1>
<script type="text/javascript" src="../js/FindAllPlace.js"></script>
<table border="1" cellspacing="0" align="center">
	<tr>
		<td>
		<input id="btn1" type="button" value="全选" onclick="allcheck();"/>
		<input id="btn2" type="button" value="重置" onclick="allnotcheck();"/>
		</td>
		<td>景点名称</td>
		<td>出游日期</td>
		<td>门票</td>
		<td><input id="btn3" type="button" value="批量删除" onclick="deleteall();"/></td>
	</tr>	
	<%
	Vector<PlaceDTO> v=(Vector<PlaceDTO>)session.getAttribute("AllPlaceInfo");//FindAllPlaceServlet里set好了
	Iterator<PlaceDTO> it=v.iterator();	
	PlaceDTO place=null;
	while(it.hasNext()){
		place=it.next();
	%>
		<tr>
		<td>
		<input type="checkbox" name="check" value=<%=place.getP_name()%>></td>
		<td><%=place.getP_name()%></td>
		<td><%=place.getDate()%></td>
		<td><%=place.getCost()%></td>
		<td>
		  <a href="UpdatePlace.jsp?pname=<%=place.getP_name()%>">修改</a>
		  <a href="DeletePlace?pname=<%=place.getP_name()%>" onclick="return confirm('您确定要删除该条记录吗？')">删除</a>
		</td>
		</tr>	
	<% 
	}	
	%>
</table>
</body>
</html>